/* ======使用注明=======
//#import "SEGHeadPartView.h"
//@property (nonatomic, strong)SEGHeadPartView *varHeadPartView; <#注释#>
// 控件数据模型创建
SEGHeadPartViewModel *data = [[SEGHeadPartViewModel alloc]init];
// 控件内容布局计算
SEGHeadPartViewLayout *layout = [[SEGHeadPartViewLayout alloc]initWithData:data type:SEGEnumHeadPartViewType_NO];
// 内容布局填充到视图
SEGHeadPartView *varHeadPartView = [[SEGHeadPartView alloc]initWithFrame:CGRectZero];
//varHeadPartView.delegate = self;
varHeadPartView.left = 0;
varHeadPartView.top = 0;
varHeadPartView.width = kScreenWidth;
varHeadPartView.height = varHeadPartView.layout.totalHeight;
[varHeadPartView setWithLayout:layout];

*/
#import <UIKit/UIKit.h>
#define kHeadPartViewHeight 300     // HeadPartView的高度
#define kHomePageHeadViewWidth [UIScreen mainScreen].bounds.size.width     // HomePageHeadView的宽度

typedef NS_ENUM(NSUInteger, SEGEnumHeadPartViewType) {
SEGEnumHeadPartViewType_NO = 0, /*未认证*/
SEGEnumHeadPartViewType_YES = 1 /*已认证*/
};

@protocol SEGprotocolHeadPartViewDelegate <NSObject>
@optional


-(void)SEGProtocolgoBackButton:(UIButton*)sender; //头像按钮点击
-(void)SEGProtocoliconButton:(UIButton*)sender; //头像按钮点击
-(void)SEGProtocolalterMessageButton:(UIButton*)sender; //修改资料按钮点击
-(void)SEGProtocolauthButton:(UIButton*)sender; //认证按钮点击

@end

@interface SEGHeadPartViewModel : NSObject
@property (nonatomic, copy) NSString *nickName; // 昵称
@property (nonatomic, copy) NSString *describe; // 描述
@property (nonatomic, copy) NSString *icon; // 头像
@property (nonatomic, copy) NSString *sex; // 性别
@property (nonatomic, copy) NSString *authentication; // 认证
@property (nonatomic, copy) NSString *level; // 等级
@property (nonatomic, copy) NSString *address; // 地址
@property (nonatomic, copy) NSString *alterMessage; // 修改资料
@property (nonatomic, assign) BOOL isOthers; // 别人的主页
@end

@interface SEGHeadPartViewLayout : NSObject
@property (nonatomic, assign,readonly) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign,readonly) SEGEnumHeadPartViewType type;//控件类型
@property (nonatomic, strong,readonly)SEGHeadPartViewModel *data;
- (instancetype)initWithData:(SEGHeadPartViewModel *)data type:(SEGEnumHeadPartViewType)type;
-(void)segHeadPartViewLayout;

@property (nonatomic, assign) CGFloat nickNameLabelHeight;//nickNameLabel 高度
@property (nonatomic, strong) SEGTextLayout *nickNameLabelTextLayout;//nickNameLabel 富文本布局

@property (nonatomic, assign) CGFloat describeLabelHeight;//describeLabel 高度
@property (nonatomic, strong) SEGTextLayout *describeLabelTextLayout;//describeLabel 富文本布局

@property (nonatomic, assign) CGFloat addressLabelHeight;//addressLabel 高度
@property (nonatomic, strong) SEGTextLayout *addressLabelTextLayout;//addressLabel 富文本布局
-(void)layout;
@end

@interface SEGHeadPartView : UIView
@property (nonatomic, strong,readonly)SEGHeadPartViewLayout *layout;
- (void)setWithLayout:(SEGHeadPartViewLayout *)layout;


@property (nonatomic, strong) UIImageView *sexImage; // 性别图标
@property (nonatomic, strong) UIImageView *authImage; // 认证图标
@property (nonatomic, strong) UIImageView *levelImage; // 等级图标

@property (nonatomic, strong) UIImageView *imageBGView; //背景图片
@property (nonatomic, strong) UIImageView *whiteBGView; // 背景白块

@property (nonatomic, strong) SEGLabel *nickNameLabel; //昵称文本
@property (nonatomic, strong) SEGLabel *describeLabel; //描述文本
@property (nonatomic, strong) SEGLabel *addressLabel; // 地址文本

@property (nonatomic, strong) UIButton *iconButton; // 头像按钮
@property (nonatomic, strong) UIButton *alterMessageButton; // 修改资料按钮
@property (nonatomic, strong) UIButton *authButton; //个人认证按钮
@property (nonatomic, strong) UIImageView *redDot; //红点


@property (nonatomic, assign) id<SEGprotocolHeadPartViewDelegate> delegate;// 代理
@end
